package com.easy.common;

import java.io.Serializable;
import java.math.BigDecimal;

public class MonthlySumResult implements Serializable {

    private Integer code;
    private String message;
    private BigDecimal totalInSum;    // 入库总金额
    private BigDecimal totalOutSum;   // 出库总金额

    public MonthlySumResult(Integer code, String message, BigDecimal totalInSum, BigDecimal totalOutSum) {
        this.code = code;
        this.message = message;
        this.totalInSum = totalInSum;
        this.totalOutSum = totalOutSum;
    }


    public static MonthlySumResult success(BigDecimal totalInSum, BigDecimal totalOutSum) {
        return new MonthlySumResult(200, "Success", totalInSum, totalOutSum);
    }

    public static MonthlySumResult fail(Integer code, String message) {
        return new MonthlySumResult(code, message, BigDecimal.ZERO, BigDecimal.ZERO);
    }

    // Getters and Setters
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public BigDecimal getTotalInSum() {
        return totalInSum;
    }

    public void setTotalInSum(BigDecimal totalInSum) {
        this.totalInSum = totalInSum;
    }

    public BigDecimal getTotalOutSum() {
        return totalOutSum;
    }

    public void setTotalOutSum(BigDecimal totalOutSum) {
        this.totalOutSum = totalOutSum;
    }
}
